//
//  TYTextField.h
//  liangyi
//
//  Created by 张水 on 16/12/19.
//  Copyright © 2016年 yswh. All rights reserved.
//
#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, TYTextFieldLeftStyle) {
    TYTextFieldStyleLeftTitle,
    TYTextFieldStyleLeftImage
};

@interface TYTextField : UITextField

/**
 *
 *  style
 *
 */
@property (nonatomic, assign) TYTextFieldLeftStyle leftStyle;

/**
 *
 *  set left title, default nil
 *
 */
@property (nonatomic, copy  ) NSString *leftTitle;

/**
 *
 *  set left font ,default equal system font
 *
 */
@property (nonatomic, strong) UIFont *leftTitleFont;


/**
 *
 *  set left title color , delfault lightGrayColor
 *
 */
@property (nonatomic, strong) UIColor *leftTitleColor;


/**
 *
 *  set left image where style is image
 *
 */
@property (nonatomic, strong) UIImage *leftImage;


- (instancetype)initWithFrame:(CGRect)frame leftStyle:(TYTextFieldLeftStyle)leftStyle;


- (void)setupLayerIfYouNeed;

@end
